#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>


int main(int argc, char *argv[]){
	int i;
	pid_t pid;

	for (i = 0;i < 5; i++){
		if (fork() == 0) {
			break;
		}
	
	}

	if (5 == i) {
		sleep(5);
		printf("i'm parent \n");

	}else {
		sleep(i);
		printf("i'm %dth child process ...\n", i+1);
	}
	
	return 0;

}

